import java.util.Random;
import java.util.Scanner;

public class NumberGuess {
    public static void main(String[] args) {

        Random rd = new Random();
        int num = rd.nextInt(100) + 1;

        while (true){
            Scanner sc = new Scanner(System.in);
            System.out.println("请输入猜测数字.");
            int numGuess = sc.nextInt();

            if (numGuess > num) {
                System.out.println("大了");
            } else if (numGuess < num) {
                System.out.println("小了");
            } else {
                System.out.println("猜对了");
                break;
            }
        }

        System.out.println("感谢使用!");

    }
}
